package com.zqweb.common.valid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Constraint(validatedBy = {CustomValidator.class})
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
// 自定义的1个校验注解
public @interface ListValue {
    // 从ValidationMessages.properties中读取message属性值
    String message() default "{com.zqweb.common.valid.ListValue.message}";
    Class<?>[] groups() default {};// 校验分组
    Class<? extends Payload>[] payload() default {};// 负载信息
    int[] val() default {};// 自定义的注解属性

}
